var loginUsername = "${loginUsername}"; //获得当前登录人员的userName

//@Bind #dgOperationTask.onDataRowClick
!function(self,arg,dsOperationTask) {
	var operationTask = dsOperationTask.getData("#");

}

//@Bind #btnQueryTask.onClick
!function(self, arg, afOperationTask, dsOperationTask) {
	var entity = afOperationTask.get("entity");
	
	dsOperationTask.set("parameter",entity).flush();
	
	var tab = view.id("tabs").get("currentTab");
	var operationTask = dsOperationTask.getData("#");
	tab.set("path", "view.inventory.UseOut.d?operationTaskUid=" + operationTask.get("taskUid"));
}

//@Bind #btnQueryPartTask.onClick
!function(self, arg, afPartTask, dsPartTask) {
	var entity = afPartTask.get("entity");
	
	dsPartTask.set("parameter",entity).flush();
	
	var tab = view.id("tabs").get("currentTab");
	var partTask = dsPartTask.getData("#");
	tab.set("path", "view.inventory.UseOut.d?operationTaskUid=" + partTask.get("taskUid"));
}

//@Bind #dgOperationTask.onCurrentChange 
!function(self, arg) {
	var operationTask = view.id("dsOperationTask").getData("#");
	var tab = view.id("tabs").get("currentTab");

	if(tab.get("name") == "UseOut"){
		tab.set("path", "view.inventory.UseOut.d?operationTaskUid=" + operationTask.get("taskUid"));
	}

}

//@Bind #dgPartTask.onCurrentChange
!function(self, arg) {
	var partTask = view.id("dsPartTask").getData("#");
	var tab = view.id("tabs").get("currentTab");

	if(tab.get("name") == "UseOut"){
		tab.set("path", "view.inventory.UseOut.d?partTaskUid=" + partTask.get("taskUid"));
	}
}

